package org.javaboy.dynamic_datasource.service;

import org.javaboy.dynamic_datasource.ds.Ds;
import org.javaboy.dynamic_datasource.mapper.BookMapper;
import org.javaboy.dynamic_datasource.model.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BookService {

    @Autowired
    BookMapper bookMapper;

//    @Ds("slave")
    public List<Book> getAll() {
        return bookMapper.getAll();
    }
}
